package com.ttmusic.utils.baidu;

import com.ttmusic.entity.AbstractMusic;
import com.ttmusic.utils.ChineseToEnglish;
import com.ttmusic.utils.TimeUtil;

import android.net.Uri;
import android.os.Parcel;

/**
 * 搜索BaiduMusicUtil.queryArtistSongList后得到的歌手的歌曲信息 分页查询    用于展示到搜索结果的ListView中
 * @author Administrator
 *
 */
public class Song extends AbstractMusic{

	private long song_id;		//歌曲id
	private String title;		//歌名
	private long ting_uid;		//歌手id   json里面返回的是ting_uid 不是artistid
	private String author;		//歌手名
	private long album_id;		//专辑id
	private String album_title;	//专辑名
	private int file_duration;	//时长
	
	
	/**
	 * 获取歌名的拼音首字母缩写
	 * @return
	 */
	public String getPinYinHeadCharofTitle() {
		return ChineseToEnglish.getPinYinHeadChar(title);
	}
	
	/**
	 * 获取音乐时长
	 * @return
	 */
	public String getDurationStr() {
		return TimeUtil.mill2mmss(this.getDuration());
	}
	
	public long getSong_id() {
		return song_id;
	}
	public void setSong_id(long song_id) {
		this.song_id = song_id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public long getTing_uid() {
		return ting_uid;
	}
	public void setTing_uid(long ting_uid) {
		this.ting_uid = ting_uid;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public long getAlbum_id() {
		return album_id;
	}
	public void setAlbum_id(long album_id) {
		this.album_id = album_id;
	}
	public String getAlbum_title() {
		return album_title;
	}
	public void setAlbum_title(String album_title) {
		this.album_title = album_title;
	}
	public int getFile_duration() {
		return file_duration * 1000;
	}
	public void setFile_duration(int file_duration) {
		this.file_duration = file_duration;
	}
	public Song() {}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel arg0, int arg1) {
		
	}

	@Override
	public AbstractMusic createFromParcel(Parcel source) {
		return null;
	}

	@Override
	public AbstractMusic[] newArray(int size) {
		return null;
	}

	@Override
	public String getPath() {
		return null;
	}

	@Override
	public Uri getDataSoure() {
		return null;
	}

	@Override
	public Integer getDuration() {
		return file_duration * 1000;
	}

	@Override
	public MusicType getType() {
		return MusicType.Online;
	}

	@Override
	public String getArtist() {
		return author;
	}

	@Override
	public String getPinYinHeadCharofArtist() {
		return ChineseToEnglish.getPinYinHeadChar(author);
	}

	@Override
	public String getPinYinHeadCharofAlbum() {
		return ChineseToEnglish.getPinYinHeadChar(album_title);
	}

	@Override
	public String getArtPic() {
		return null;
	}

	@Override
	public int blurValueOfPlaying() {
		return 0;
	}
	
}
